-- GENERATED SPELL FOR [Drakkari Bear Trapper] --


function spell0_28418(pUnit, Event) --@Bear Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(53432,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_28418', 1, 1)
end

function spell1_28418(pUnit, Event) --@Jump Attack,n/a--
pUnit:FullCastSpellOnTarget(61227,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28418', 607, 1)
end

function spell2_28418(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(38556,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28418', 1500, 1)
end

function Sorts_28418(pUnit, Event)
local choix_sorts_28418 = math.random(0, 2)
if choix_sorts_28418 == 0 then
pUnit:RegisterEvent('spell0_28418', 1, 1)
end
if choix_sorts_28418 == 1 then
pUnit:RegisterEvent('spell1_28418', 1, 1)
end
if choix_sorts_28418 == 2 then
pUnit:RegisterEvent('spell2_28418', 1, 1)
end
end

function mob28418_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28418', math.random(1500, 3000), 1)
end

function mob28418_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28418_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28418_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28418, 1, 'mob28418_Action')
RegisterUnitEvent(28418, 2, 'mob28418_Leave')
RegisterUnitEvent(28418, 3, 'mob28418_Kill')
RegisterUnitEvent(28418, 4, 'mob28418_Die')
